package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 系统性能监控表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_system_performance")
public class SystemPerformance extends Model<SystemPerformance> {

    private static final long serialVersionUID = 1L;

    /**
     * 性能记录唯一标识
     */
    @TableId("performance_id")
    private Long performanceId;
    /**
     * 监控时间
     */
    @TableField("monitor_time")
    private Date monitorTime;
    /**
     * 系统响应时间（单位：秒）
     */
    @TableField("response_time")
    private BigDecimal responseTime;
    /**
     * 系统吞吐量（单位：TPS）
     */
    private BigDecimal throughput;
    /**
     * CPU 使用率（百分比）
     */
    @TableField("cpu_usage")
    private BigDecimal cpuUsage;
    /**
     * 内存使用率（百分比）
     */
    @TableField("memory_usage")
    private BigDecimal memoryUsage;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getPerformanceId() {
        return performanceId;
    }

    public void setPerformanceId(Long performanceId) {
        this.performanceId = performanceId;
    }

    public Date getMonitorTime() {
        return monitorTime;
    }

    public void setMonitorTime(Date monitorTime) {
        this.monitorTime = monitorTime;
    }

    public BigDecimal getResponseTime() {
        return responseTime;
    }

    public void setResponseTime(BigDecimal responseTime) {
        this.responseTime = responseTime;
    }

    public BigDecimal getThroughput() {
        return throughput;
    }

    public void setThroughput(BigDecimal throughput) {
        this.throughput = throughput;
    }

    public BigDecimal getCpuUsage() {
        return cpuUsage;
    }

    public void setCpuUsage(BigDecimal cpuUsage) {
        this.cpuUsage = cpuUsage;
    }

    public BigDecimal getMemoryUsage() {
        return memoryUsage;
    }

    public void setMemoryUsage(BigDecimal memoryUsage) {
        this.memoryUsage = memoryUsage;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "SystemPerformance{" +
        ", performanceId=" + performanceId +
        ", monitorTime=" + monitorTime +
        ", responseTime=" + responseTime +
        ", throughput=" + throughput +
        ", cpuUsage=" + cpuUsage +
        ", memoryUsage=" + memoryUsage +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
